package com.ming.interview;

import java.util.Scanner;

/**
 * @Description 给一个不多于5位的正整数，要求：一、求它是几位数，二、逆序打印出各位数字。
 * @Author ye.ming
 * @Date Created in 2019/8/26
 */
public class Main21_1 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int last = num;
        int temp = 0;
        if (num < 0 || num >= 100000) {
            return;
        }
        for (int i = 0; i < 6; i++) {
            if (last != 0) {
                temp = last % 10;
                last = last/10;
                System.out.print(temp);
            } else {
                System.out.println();
                System.out.println(i);
                break;
            }
        }

        sc.close();
    }


    private static void m1(int m, int n) {

    }


}
